{% extends "base.html" %}
{% load tags %}
{% block title %}Firmos darbuotojai{% endblock %}
{% block content %}
<h1 class="headerText">Firmos darbuotojų sąrašas</h1>
<table class="reportTable thickHeader">
  <thead>
    <tr>
      <th sort_index="0">Skyrius</th>
      <th sort_index="1">Nr</th>
      <th sort_index="2">Darbuotojas</th>
    </tr>
  </thead>
  {% for r in report %}
    <tr>
      <td rowspan="{{ r.employees|length|add:'1' }}">{{ r.department }}</td>
    </tr>
    {% for employee in r.employees %}
      <tr class="{{ forloop.counter|oddOrEven }}">
        <td>{{ forloop.counter }}</td>
        <td><a href="/personal/{{ employee }}">{{ employee }}</a></td>
      </tr>
    {% endfor %}
  {% endfor %}
</table>
{% endblock %}
